// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';
import { paramsSerializer } from '@/utils';
// 网易云音乐飙升榜单音乐列表
export async function playlistTrackAll(
  params?: MUSICAPI.PlaylistTrackT,
  options?: Record<string, any>,
): Promise<MUSIC.PlaylistTrackBackT> {
  return request('/musicapi/playlist/track/all', {
    method: 'GET',
    params,
    paramsSerializer,
    ...(options || {}),
  });
}
// 获取歌词列表
export async function getLyric(
  id: number,
  options?: Record<string, any>,
): Promise<MUSIC.PlaylistTrackBackT> {
  return request('/musicapi/lyric', {
    method: 'GET',
    params: {
      id,
    },
    paramsSerializer,
    ...(options || {}),
  });
}

export async function getSongDetail(id: number) {
  return request<any>(`/musicapi/song/detail`, {
    method: 'GET',
    params: {
      ids: id,
    },
    paramsSerializer,
  });
}
